<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Contact
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Contact</h2>
    <img id="updating" src="/content/ajax-loader.gif" style="display: none;" alt="Updating ..." />
    <br />
    <% using (Ajax.BeginForm("ContactForm",
            new AjaxOptions { LoadingElementId = "updating" }))
       { %>
    <div>
        <table>
            <tr>
                <td>
                    Name:
                </td>
                <td>
                    <%= Html.TextBox("name") %>
                </td>
            </tr>
            <tr>
                <td>
                    Email:
                </td>
                <td>
                    <%= Html.TextBox("email") %>
                </td>
            </tr>
            <tr>
                <td>
                    Subject:
                </td>
                <td>
                    <%= Html.TextBox("subject")%>
                </td>
            </tr>
            <tr>
                <td>
                    Body:
                </td>
                <td>
                    <%= Html.TextArea("body") %>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="submit" value="Send" />
                </td>
            </tr>
        </table>
    </div>
    <% } %>
</asp:Content>
